

const Errors  = ({errors})=>{
    // console.log('errors',errors);
   
    if(!errors){
        return null
    }

    // errors :{message:'',errors:{}}
    return (
        <ul className="error-messages">
            {/* {    
                Object.keys(errors).map(key=>{
                    return (
                            <li key={key}>
                                {key}:{errors[key]}
                            </li>
                            )
                })
            } */}
             <li >
                {errors.message}
            </li>
        </ul>
    )

}

export default Errors